package com.lonewalker.sparrow.domain;

import lombok.Data;

import java.util.List;

/**
 * 树节点定义
 *
 * @author lonewalker
 */
@Data
public class TreeNode {

    /**
     * 节点id
     */
    private Long id;
    /**
     * 节点名称
     */
    private String name;
    /**
     * 父节点id
     */
    private Long parentId;
    /**
     * 子节点
     */
    private List<TreeNode> children;

    public TreeNode() {
    }

    public TreeNode(Long id, String name, Long parentId) {
        this.id = id;
        this.name = name;
        this.parentId = parentId;
    }
}
